﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace NZBMatrixAdvancedFeedReader.UserControls
{
    public partial class ucResultBlock : UserControl 
    {

        public ucResultBlock()
        {
            InitializeComponent();
        }

        #region Properties
        
        public string Title { get { return txtTitle.Text; } set { txtTitle.Text = value; } }

        public string Link { get { return llLink.Text; } set { llLink.Text = value; } }

        public string FileSize { get { return txtSize.Text; } set { txtSize.Text = value; } }

        public string IMDBLink { get { return lblIMDBLink.Text; } set { lblIMDBLink.Text = value; } }

        public string MovieName { get { return txtMovieName.Text; } set { txtMovieName.Text = value; } }

        public string MovieYear { get { return txtMovieYear.Text; } set { txtMovieYear.Text = value; } }

        public string MovieRate { get { return txtMovieRate.Text; } set { txtMovieRate.Text = value; } }

        public Color MovieRateColor { get { return txtMovieRate.BackColor; } set { txtMovieRate.BackColor = value; } }

        public string MovieRateVotes { get { return txtMovieRateVotes.Text; } set { txtMovieRateVotes.Text = value; } }

        public string MovieImageUrl { get { return pbThumbnail.ImageLocation; } set { pbThumbnail.ImageLocation = value; } }

        public string Description { get { return wbDescription.DocumentText; } set { wbDescription.DocumentText = value; } }

        #endregion

        #region Event Handlers

        private void lblIMDBLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (lblIMDBLink.Text.Contains("imdb"))
            {
                System.Diagnostics.Process.Start(lblIMDBLink.Text);
            }
        }

        private void llLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (llLink.Text.Contains("http"))
            {
                System.Diagnostics.Process.Start(llLink.Text);
            }
        }

        #endregion

    }
}
